//
//  NSPasteboard+logic.m
//  keyboardtest
//
//  Created by  JasonLee on 2022/1/6.
//

#import "NSPasteboard+logic.h"

@implementation NSPasteboard (logic)
+(void)load {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
//        [self hookMethod];
    });
}

+(void)hookMethod {
    TJJReplaceMethod([self class], @selector(setString:forType:), @selector(swi_setString:forType:));
}
-(BOOL)swi_setString:(NSString *)string forType:(NSPasteboardType) type{
    NSLog(@"======%@",string);
    return [self swi_setString:string forType:type];
}
@end
